<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="java.util.*"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>用户列表</title>
</head>
<body>
<table border="0">

    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>电子邮件</th>
    </tr>

    <c:forEach items="${users}" var="user" varStatus="st">
        <tr>
            <td>${user.id}</td>
            <td>${user.username}</td>
            <td>${user.email}</td>
            <td><a href="${pageContext.request.contextPath}/user/updateUser?id=${user.id}">修改</a>|<a href="${pageContext.request.contextPath}/user/delUser?id=${user.id}">删除</a></td>
        </tr>
    </c:forEach>


    <tr>
        <td colspan="3">
            <a href="${pageContext.request.contextPath}/user/addUser">添加</a>
        </td>
    </tr>


</table>
</body>
</html>
